import { createRouter, createWebHashHistory } from 'vue-router'

const routes = [{
  path: '/',
  redirect: '/login'
},
{
  path: '/login',
  name: 'Login',
  component: () => import('@/plugin/ulogin/index.vue')
},
// {
//   path: '/OAlogin',
//   name: 'OALogin',
//   component: () => import('@/plugin/OAulogin/index.vue')
// },
{
  path: '/dataCenter',
  name: 'DataCenter',
  component: () => import('@/plugin/dataCenter/index.vue')
},
{
  path: '/:catchAll(.*)',
  meta: {
    closeTab: true,
  },
  component: () => import('@/view/error/index.vue')
}, 
{
  path: '/mobile/orderList',
  name: 'OrderList',
  component: () => import('@/view/plmOrderList/plmOrderList.vue'),
  meta: { keepAlive: true },
}, 
{
  path: '/mobile/orderSearch',
  name: 'OrderSearch',
  component: () => import('@/view/plmOrderSearch/plmOrderSearch.vue')
}, 
{
  path: '/mobile/firstOrderDetail',
  name: 'FirstOrderDetail',
  component: () => import('@/view/plmFirstOrderProcessing/plmFirstOrderProcessingDetail.vue')
}, 
{
  path: '/mobile/largeOrderDetail',
  name: 'LargeOrderDetail',
  component: () => import('@/view/plmLargeOrderProcessing/plmLargeOrderProcessingDetail.vue')
}, 
{
  path: '/mobile/productStyleDetail',
  name: 'ProductStyleDetail',
  component: () => import('@/view/plmProductStyles/plmProductStylesDetail.vue')
}, 
{
  path: '/mobile/dataCenter',
  name: 'DataCenter',
  component: () => import('@/view/dataCenter/dataCenter.vue')
},
]

const router = createRouter({
  history: createWebHashHistory(),
  routes,
})

export default router
